package com.chartHandle.config;

import com.projectCommon.util.commonUtil.FileUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author 吴宇~
 * @motto 我亦无他，唯手熟尔。
 * @edition jdk1.8
 * @reflection 0-1 喧闹任其喧闹，自由我自为之，我自风情万种，与世无争。
 * @date 2024/09/17/17:55
 * @target 心若有所向往，何惧道阻且长
 */
@Component
public class SmokeOrderTemplate2Config {
    @Value("${wy.template.smokeOrder.path}")
    private String basePath;
    @Value("${wy.template.smokeOrder.t2.fileName}")
    private String fileName;
    @Value("${wy.template.smokeOrder.t2.showColumnWidth}")
    private String showColumnWidth;

    private byte[] fileByte;
    @PostConstruct
    public void init(){
        this.fileByte = FileUtil.getResourceFileByte(basePath + fileName);
    }

    public String getBasePath() {
        return basePath;
    }

    public String getFileName() {
        return fileName;
    }

    public String getShowColumnWidth() {
        return showColumnWidth;
    }

    public byte[] getFileByte() {
        return fileByte;
    }
}
